<template>
  <view>	
		<template v-for="item in children">
			<view @click="open_sendmessage(item)" style="margin-bottom: 8rpx;">
				{{item.user_info.username}}回复{{user.user_info.username}}: {{item.content}}
			</view>
			<child-message
				v-if="item.children.length>0" 
				:user="item"
				:children="item.children">
			</child-message>
		</template>	
  </view>
</template>
 
<script>
	// 留言
	import ChildMessage from './ChildMessage.vue'
	export default {
		name:"child-message",
		props:['children','user'],
		components:{
			ChildMessage
		},
		data(){
			return {
			   
			}
		},
		methods:{
			open_sendmessage(item){
				this.$parent.open_message_send(item)
			}
		},
		onReady() {
			console.log('this.children')
			console.log(this.children)
		}
	}
</script>